package com.cardrive;

import android.app.Activity;
import android.os.Bundle;
import android.view.ViewGroup.LayoutParams;

import com.cardrive.engine.GameEngine;

public class CarDriveActivity extends Activity {

	GameEngine driveEngine;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		driveEngine = new GameEngine(this.getBaseContext());

		this.addContentView(driveEngine, new LayoutParams(320, 480));
	}
	
	@Override
	protected void onDestroy() {
		super.onDestroy();
		
		driveEngine.getCar().getEngine().powerOff();
	}
}